package com.apiserver.data.Exception;


/**
 * @Author feizhou
 * @Description 这个方法有什么用
 * @Date 下午 5:16 2019/10/8 0008
 * @Param
 * @return
 **/

public class DataException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     */
    private Integer errCode;

    /**
     * 错误信息
     */
    private String errMes;

    public DataException() {
    }

    public DataException(Integer errCode, String errMes) {
        super(errMes);
        this.errCode = errCode;
        this.errMes = errMes;
    }

    public DataException(ErrCode eErrCode) {
        super(eErrCode.getErrMess());
        this.errCode = eErrCode.getCode();
        this.errMes = eErrCode.getErrMess();
    }


}
